﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="relatorioComparativo.aspx.cs" Inherits="ivv.relatorios.relatorioComparativo" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Fiepe - IVV</title>
    <script src="../js/jquery.tools.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../js/tabs-accordion.css" />
    <link href="../css/estilos.css" rel="stylesheet" type="text/css" />
        <script language=javascript>

            function mensagem(msg) {
                alert(msg);
            }
    
        </script>
</head>
<body>
    <form id="form1" runat="server">
    <h2 class="titulo">
        Relatório comparativo</h2>
    <table>
        <tr>
            <td>
                Ano:
                <asp:DropDownList ID="lstAno" runat="server" AutoPostBack="true" OnSelectedIndexChanged="lstAno_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td>
                Mês:
                <asp:DropDownList ID="lstMes" runat="server">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="btnGerar" runat="server" Text="Gerar" OnClick="btnGerar_Click" />
            </td>
        </tr>
    </table>
    <br />
    <hr />
    <br />
    <asp:Panel ID="Panel2" runat="server">
    </asp:Panel>
    <asp:Panel ID="Panel1" runat="server" Visible="false">
        <table width="100%">
            <tr>
                <td width="50%">
                    <div id="accordion">
                        <h2 class="current aba">
                            Ofertas totais</h2>
                        <div class="pane" style="display: block">
                            <table width="100%">
                                <tr>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>:&nbsp;&nbsp;<asp:Label ID="lblOfertatotalI" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="34%" align="left">
                                        <h3>
                                            <%=pegarMes(Convert.ToInt16(lstMes.SelectedValue) - 1) %>
                                            de
                                            <%
                                                if (lstMes.SelectedValue != "1")
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text));
                                                }
                                                else
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text) - 1);
                                                }
                                            %>:&nbsp;&nbsp;<asp:Label ID="lblOfertatotalII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>:&nbsp;&nbsp;<asp:Label ID="lblOfertatotalIII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <table border="1" cellpadding="5" cellspacing="0" bordercolor="#99CCFF" width="100%">
                                <tr>
                                    <th rowspan="2">
                                        Variação (%)
                                    </th>
                                    <th>
                                        Mês / Mês anterior
                                    </th>
                                    <th>
                                        Mês / Ano anterior
                                    </th>
                                    <th>
                                        Acumulado –
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>
                                        /
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>
                                    </th>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblOfertaTotalMes" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblOfertaTotalMesAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblOfertaTotalMesPercAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <h2 class="aba">
                            Ofertas</h2>
                        <div class="pane">
                            <table width="100%">
                                <tr>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>:&nbsp;&nbsp;<asp:Label ID="lblOfertaI" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="34%" align="left">
                                        <h3>
                                            <%=pegarMes(Convert.ToInt16(lstMes.SelectedValue) - 1) %>
                                            de
                                            <%
                                                if (lstMes.SelectedValue != "1")
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text));
                                                }
                                                else
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text) - 1);
                                                }
                                            %>:&nbsp;&nbsp;<asp:Label ID="lblOfertaII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>:&nbsp;&nbsp;<asp:Label ID="lblOfertaIII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <table border="1" cellpadding="5" cellspacing="0" bordercolor="#99CCFF" width="100%">
                                <tr>
                                    <th rowspan="2">
                                        Variação (%)
                                    </th>
                                    <th>
                                        Mês / Mês anterior
                                    </th>
                                    <th>
                                        Mês / Ano anterior
                                    </th>
                                    <th>
                                        Acumulado –
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>
                                        /
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>
                                    </th>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblOfertaMes" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblOfertaMesAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblOfertaMesPercAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <h2 class="aba">
                            Lançamentos</h2>
                        <div class="pane">
                            <table width="100%">
                                <tr>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>:&nbsp;&nbsp;<asp:Label ID="lblLancamentoI" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="34%" align="left">
                                        <h3>
                                            <%=pegarMes(Convert.ToInt16(lstMes.SelectedValue) - 1) %>
                                            de
                                            <%
                                                if (lstMes.SelectedValue != "1")
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text));
                                                }
                                                else
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text) - 1);
                                                }
                                            %>:&nbsp;&nbsp;<asp:Label ID="lblLancamentoII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>:&nbsp;&nbsp;<asp:Label ID="lblLancamentoIII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <table border="1" cellpadding="5" cellspacing="0" bordercolor="#99CCFF" width="100%">
                                <tr>
                                    <th rowspan="2">
                                        Variação (%)
                                    </th>
                                    <th>
                                        Mês / Mês anterior
                                    </th>
                                    <th>
                                        Mês / Ano anterior
                                    </th>
                                    <th>
                                        Acumulado –
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>
                                        /
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>
                                    </th>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblLancamentoMes" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblLancamentoMesAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblLancamentoMesPercAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
                <td width="50%">
                    <div id="accordion2">
                        <h2 class="current aba">
                            Vendas totais</h2>
                        <div class="pane" style="display: block">
                            <table width="100%">
                                <tr>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>:&nbsp;&nbsp;<asp:Label ID="lblVendaTotalI" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="34%" align="left">
                                        <h3>
                                            <%=pegarMes(Convert.ToInt16(lstMes.SelectedValue) - 1) %>
                                            de
                                            <%
                                                if (lstMes.SelectedValue != "1")
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text));
                                                }
                                                else
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text) - 1);
                                                }
                                            %>:&nbsp;&nbsp;<asp:Label ID="lblVendaTotalII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>:&nbsp;&nbsp;<asp:Label ID="lblVendaTotalIII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <table border="1" cellpadding="5" cellspacing="0" bordercolor="#99CCFF" width="100%">
                                <tr>
                                    <th rowspan="2">
                                        Variação (%)
                                    </th>
                                    <th>
                                        Mês / Mês anterior
                                    </th>
                                    <th>
                                        Mês / Ano anterior
                                    </th>
                                    <th>
                                        Acumulado –
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>
                                        /
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>
                                    </th>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblVendaTotalMes" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblVendaTotalMesAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblVendaTotalMesPercAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <h2 class="aba">
                            Vendas</h2>
                        <div class="pane">
                            <table width="100%">
                                <tr>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>:&nbsp;&nbsp;<asp:Label ID="lblVendaI" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="34%" align="left">
                                        <h3>
                                            <%=pegarMes(Convert.ToInt16(lstMes.SelectedValue) - 1) %>
                                            de
                                            <%
                                                if (lstMes.SelectedValue != "1")
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text));
                                                }
                                                else
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text) - 1);
                                                }
                                            %>:&nbsp;&nbsp;<asp:Label ID="lblVendaII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>:&nbsp;&nbsp;<asp:Label ID="lblVendaIII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <table border="1" cellpadding="5" cellspacing="0" bordercolor="#99CCFF" width="100%">
                                <tr>
                                    <th rowspan="2">
                                        Variação (%)
                                    </th>
                                    <th>
                                        Mês / Mês anterior
                                    </th>
                                    <th>
                                        Mês / Ano anterior
                                    </th>
                                    <th>
                                        Acumulado –
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>
                                        /
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>
                                    </th>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblVendaMes" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblVendaMesAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblVendaMesPercAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <h2 class="aba">
                            Vendas dos lançamentos</h2>
                        <div class="pane">
                            <table width="100%">
                                <tr>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>:&nbsp;&nbsp;<asp:Label ID="lblVendaLancamentoI" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="34%" align="left">
                                        <h3>
                                            <%=pegarMes(Convert.ToInt16(lstMes.SelectedValue) - 1) %>
                                            de
                                            <%
                                                if (lstMes.SelectedValue != "1")
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text));
                                                }
                                                else
                                                {
                                                    Response.Write(Convert.ToInt16(lstAno.SelectedItem.Text) - 1);
                                                }
                                            %>:&nbsp;&nbsp;<asp:Label ID="lblVendaLancamentoII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                    <td width="33%" align="left">
                                        <h3>
                                            <%=lstMes.SelectedItem.Text %>
                                            de
                                            <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>:&nbsp;&nbsp;<asp:Label ID="lblVendaLancamentoIII" CssClass="valor" runat="server"
                                                Text="Label"></asp:Label>
                                        </h3>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <table border="1" cellpadding="5" cellspacing="0" bordercolor="#99CCFF" width="100%">
                                <tr>
                                    <th rowspan="2">
                                        Variação (%)
                                    </th>
                                    <th>
                                        Mês / Mês anterior
                                    </th>
                                    <th>
                                        Mês / Ano anterior
                                    </th>
                                    <th>
                                        Acumulado –
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) %>
                                        /
                                        <%=Convert.ToInt16(lstAno.SelectedItem.Text) - 1 %>
                                    </th>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblVendaLancamentoMes" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblVendaLancamentoMesAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblVendaLancamentoMesPercAno" CssClass="valor2" ForeColor="Blue" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <!-- activate tabs with JavaScript -->

        <script>            $(function() { $("#accordion").tabs("#accordion div.pane", { tabs: 'h2', effect: 'slide', initialIndex: null }); });</script>

        <script>            $(function() { $("#accordion2").tabs("#accordion2 div.pane", { tabs: 'h2', effect: 'slide', initialIndex: null }); });</script>

    </asp:Panel>
    </form>
</body>
</html>
